﻿<p class="lead">Shell命令何其多，读者应该始终牢记的一点是，应该用肌肉，而不是头脑去记忆这些命令和选项。 </p>
<p><strong>目录与路径</strong></p>
<p>在准备档案管理之前，我们先来认识一下<code>linux</code>中的目录与路径：</p>
<h2 id="shell-cmd-cd">cd</h2>
@Html.Partial("~/Views/shell/docs/_cd.cshtml")
<h2 id="shell-cmd-pwd">pwd</h2>
@Html.Partial("~/Views/shell/docs/_pwd.cshtml")
<h2 id="shell-cmd-pwd">mkdir</h2>
@Html.Partial("~/Views/shell/docs/_mkdir.cshtml")
<h2 id="shell-cmd-pwd">rmdir</h2>
@Html.Partial("~/Views/shell/docs/_rmdir.cshtml")

<p><strong>目录与档案管理</strong></p>
<p>目录与档案的基本管理不外乎【显示属性】、【复制】、【删除】、【移动】等操作；</p>

<h2 id="shell-cmd-ls">ls</h2>
@Html.Partial("~/Views/shell/docs/_ls.cshtml")
<h2 id="shell-cmd-cp">cp</h2>
@Html.Partial("~/Views/shell/docs/_cp.cshtml")
<h2 id="shell-cmd-cp">rm</h2>
@Html.Partial("~/Views/shell/docs/_rm.cshtml")
<h2 id="shell-cmd-mv">mv</h2>
@Html.Partial("~/Views/shell/docs/_mv.cshtml")

<p><strong>档案内容查阅</strong></p>
<ul>
    <li><code>cat</code>由第一行开始显示档案内容</li>
    <li><code>tac</code>从最后一行开始显示档案内容，可以看出<code>tac</code>是<code>cat</code>的倒着写。</li>
    <li><code>nl</code>显示的时候，顺道输出行号。</li>
    <li><code>more</code>一页一页的显示档案内容</li>
    <li><code>less</code>与<code>more</code>相似，但是比more更好的是，它可以往前面翻页。</li>
    <li><code>head</code>只看头几行。</li>
    <li><code>tail</code>只看末几层。</li>
    <li><code>od</code>以二进制的方式读取档案内容。</li>
</ul>
<h2 id="shell-cmd-cat">cat</h2>
@Html.Partial("~/Views/shell/docs/_cat.cshtml")
<h2 id="shell-cmd-nl">nl</h2>
@Html.Partial("~/Views/shell/docs/_nl.cshtml")
<h2 id="shell-cmd-more">more</h2>
@Html.Partial("~/Views/shell/docs/_more.cshtml")
<h2 id="shell-cmd-less">less</h2>
@Html.Partial("~/Views/shell/docs/_less.cshtml")

<h2 id="shell-cmd-head">head</h2>
@Html.Partial("~/Views/shell/docs/_head.cshtml")
<h2 id="shell-cmd-tail">tail</h2>
@Html.Partial("~/Views/shell/docs/_tail.cshtml")
<h2 id="shell-cmd-touch">touch</h2>
@Html.Partial("~/Views/shell/docs/_touch.cshtml")
